package com.book.helper;

import com.book.dto.TempOrderBookDto;
import com.book.vo.OrderBookVo;

/**
 * @version 1.0
 * @Author Jincheng.Li
 * @Date 2021/6/1 9:35 上午
 * @Project_Name graduation-project
 */
public class OrderVoHelper {
    public static TempOrderBookDto covertVoToTempDto(OrderBookVo vo){
        if (vo == null){
            return null;
        }
        TempOrderBookDto dto = new TempOrderBookDto();
        dto.setBookCode(vo.getBookCode());
        dto.setBookName(vo.getBookName());
        dto.setImgUrl(vo.getImgUrl());
        dto.setNum(vo.getNum());
        dto.setPrice(vo.getPrice());
        dto.setBookAuthor(vo.getBookAuthor());
        dto.setCategory(vo.getCategory());
        dto.setUId(vo.getUId());
        dto.setTotalPrice(vo.getTotalPrice());
        dto.setIsAmple(vo.getIsAmple());
        return dto;
    }
}
